package org.example.pack1024;

public class User {
    private int id;
    private String name;

    public User() {
        System.out.println("没有参数");
    }

    public User(int id) {
        System.out.println("一个参数");
        this.id = id;
    }

    private User(String name) {
        System.out.println("一个参数");
        this.name = name;
    }

    public User(int id, String name) {
        System.out.println("两个参数");
        this.id = id;
        this.name = name;
    }

    @Override
    public String toString() {
        return "Users{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
